﻿using UnityEngine;
using System.Collections;

public class plusTime : MonoBehaviour {

	// Use this for initialization
	public float timeToDelete = 0.5f;
	void Start () {
		GameObject.Find("Spawner").SendMessage("AddTime",5);
		GameObject.Find("ScoreText").SendMessage("AddScore");
	}
	
	// Update is called once per frame
	void Update () {

		timeToDelete -= 1f/60f;
		this.transform.localScale = this.transform.localScale*1.025f;

		if(timeToDelete < 0)
			DestroyImmediate(this.gameObject);
	
	}
}
